//
//  CQContentView.m
//  DuNang
//
//  Created by 陈长青 on 2017/4/6.
//  Copyright © 2017年 TZA. All rights reserved.
//

#import "CQContentView.h"
#import "CQVideoPlayer.h"
#import "CQVideoCell.h"

@interface CQContentView ()

@property (weak, nonatomic) IBOutlet UIButton *playBtn;

// 播放器

@property (nonatomic, weak) CQVideoPlayer *videoPlayer;

@end

@implementation CQContentView
@synthesize cell=_cell;

- (CQVideoPlayer *)videoPlayer {
    
    if ([_cell isKindOfClass:[CQVideoCell class]]) {
        
        CQVideoCell *videoCell = (CQVideoCell *)_cell;
        
        return videoCell.videoPlayer;
    }
    return nil;
}

- (IBAction)play {
    
    [self.videoPlayer play];
    _playBtn.hidden = YES;

    self.cell.toolBar.hidden = NO;
}

@end
